package com.fr.transfer.cal;

import java.sql.Connection;
import java.sql.SQLException;

import com.fr.data.core.db.DBUtils;
import com.fr.data.core.db.dialect.Dialect;
import com.fr.data.core.db.dml.Table;
import com.fr.data.impl.sap.SAPTransferColumnConfig;
import com.fr.write.config.ColumnConfig;
import com.fr.write.config.InsertConfig;
import com.fr.write.config.IntelliDMLConfig;

public class IntelliJober implements SubmitJober {
	private IntelliDMLConfig intelli;
	
	public IntelliJober(Table table, SAPTransferColumnConfig[] cons) {
		intelli = new IntelliDMLConfig();
		for (int i = 0; i < cons.length; i++) {
			intelli.addColumnConfig(new ColumnConfig(cons[i].getColumnName(), null, cons[i].isKey(), false));
		}
		intelli.setTable(table);
	}

	public void dealSubmit(Dialect dialect, Connection conn, Object[] values) throws SQLException {
		intelli.simpleSubmit(conn, dialect, values);
	}

	public void finish() throws SQLException {
	}
}
